﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zj.OpenAuth.Domain.Core;

namespace Zj.OpenAuth.DTO.Common
{
    /// <summary>
    /// deparment data transfer object
    /// </summary>
    public class DepartmentDTO
    {
        public int Id { get; set; }
        public int? ParentId { get; set; }


        [Display(Name = "部门名称")]
        [Required]
        [StringLength(36, MinimumLength = 2)]
        public string Text { get; set; }



        [Display(Name = "部门编号")]
        [DisplayFormat(NullDisplayText ="未设置编码")]
        [StringLength(36)]
        public string Code { get; set; }



        [Display(Name = "部门描述")]
        [DisplayFormat(NullDisplayText = "未填写描述")]
        [StringLength(1000)]
        public string Description { get; set; }



        [Display(Name = "联系电话")]
        [DisplayFormat(NullDisplayText = "未填写手机号")]
        [DataType(DataType.PhoneNumber)]
        public string Phone { get; set; }



        public StatusEnum Status { get; set; }



        public int? ManagerId { get; set; }




        [Display(Name = "负责人")]
        public User Manager { get; set; }


    }
}
